﻿using System.Xml.Serialization;

namespace SQLMap.Core.Condition
{

    /// <summary>
    /// <![CDATA[筛选条件]]>
    /// </summary>
    [XmlType("filter")]
    public class Filter
    {

        /// <summary>
        /// 构造
        /// </summary>
        public Filter()
        {
            Connector = "And";//默认And连接器
        }

        /// <summary>
        /// 字段
        /// </summary>
        [XmlAttribute("field")]
        public string Field { get; set; }

        /// <summary>
        /// 操作符
        /// </summary>
        /// <returns></returns>
        [XmlAttribute("operator")]
        public string Operator { get; set; }


        /// <summary>
        /// 值
        /// </summary>
        [XmlAttribute("value")]
        public string Value { get; set; }

        /// <summary>
        /// 连接器（And、Or）
        /// </summary>
        [XmlAttribute("connector")]
        public string Connector { get; set; }
    }
}
